package com.mycode.proxy13.resolve;

// 身份验证类：业务类
public class AccessValidator {

    public boolean validate(String userId) {
        System.out.println("在数据库中验证用户 ‘" + userId + "’ 是否是合法用户");
        if (userId.equalsIgnoreCase("zhangsan")) {
            System.out.println("'" + userId + "'登录成功");
            return true;
        }
        else {
            System.out.println("'" + userId + "' 登录失败");
            return false;
        }
    }
}
